package com.anmong.cloud.cloudcommon.constant;

import java.util.Objects;

public class CommonEnum {

    public enum Is {
        否(0),
        是(1),;

        public Integer code;

        Is(Integer code) {
            this.code = code;
        }

        public static String getNameByCode(Integer code) {
            if (code == null) {
                return "";
            }

            for (Is type : Is.values()) {
                if (Objects.equals(code, type.code)) {
                    return type.name();
                }
            }
            return "";
        }

    }

    //服务名称前缀
    public enum MicroService {
        CLOUD_ADMIN("/cloud-admin"),
        ;

        public String code;

        MicroService(String code) {
            this.code = code;
        }

    }


}
